package com.siemens.industrial.model.admin;

import org.springframework.jdbc.core.RowMapper;

import java.util.Date;

/**
 * Created by qupen on 2016/9/18.
 */
public class TenantServiceRelation {
    private String tenantId;
    private String serviceId;
    private java.sql.Date startDate;
    private java.sql.Date endDate;
    private int enabled;

    private static final RowMapper<TenantServiceRelation> rowMapper = (resultSet, i) -> {
        TenantServiceRelation tenantServiceRelation = new TenantServiceRelation();
        tenantServiceRelation.setTenantId(resultSet.getString("tenant_id"));
        tenantServiceRelation.setServiceId(resultSet.getString("service_id"));
        tenantServiceRelation.setStartDate(resultSet.getDate("start_date"));
        tenantServiceRelation.setEndDate(resultSet.getDate("end_date"));
        tenantServiceRelation.setEnabled(resultSet.getInt("enabled"));
        return tenantServiceRelation;
    };

    public static RowMapper<TenantServiceRelation> getRowMapper() {
        return rowMapper;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(java.sql.Date startDate) {
        this.startDate = startDate;
    }

    public java.sql.Date getEndDate() {
        return endDate;
    }

    public void setEndDate(java.sql.Date endDate) {
        this.endDate = endDate;
    }

    public int getEnabled() {
        return enabled;
    }

    public void setEnabled(int enabled) {
        this.enabled = enabled;
    }
}
